package com.example.strategy;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description : TODO
 * @Author : ZYX
 * @Date : 2022/6/13 14:20
 * @Version : 1.0
 **/
@PropertySource(value = "classpath:factories.properties")
@Configuration
@ConfigurationProperties(prefix = "sign.interface")
public class SignGeneratorProperties {

    private Map<String,Object> generatorMap = new HashMap<>();

    public Map<String, Object> getGeneratorMap() {
        return generatorMap;
    }

    public void setGeneratorMap(Map<String, Object> generatorMap) {
        this.generatorMap = generatorMap;
    }

    public Object findGeneratorClassName(String key){
        return generatorMap.get(key);
    }
}
